package com.netposa.datawarehouse.statistics.vo;

import com.netposa.datawarehouse.statistics.utils.NumberUtils;

public class MachineStateVO {
   private String name;
   private Double cpu;
   private Double disk;
   private Double gpu;
   private Double memory;
   private Double networkDownward;
   private Double networkUpward;

   public MachineStateVO(String name, Double cpu, Double disk, Double gpu, Double memory, Double networkDownward, Double networkUpward) {
      this.name = name;
      this.cpu = cpu;
      this.disk = disk;
      this.gpu = NumberUtils.keepPrecision(gpu);
      this.memory = memory;
      this.networkDownward = networkDownward;
      this.networkUpward = networkUpward;
   }

   public String getName() {
      return this.name;
   }

   public Double getCpu() {
      return this.cpu;
   }

   public Double getDisk() {
      return this.disk;
   }

   public Double getGpu() {
      return this.gpu;
   }

   public Double getMemory() {
      return this.memory;
   }

   public Double getNetworkDownward() {
      return this.networkDownward;
   }

   public Double getNetworkUpward() {
      return this.networkUpward;
   }

   public void setName(String name) {
      this.name = name;
   }

   public void setCpu(Double cpu) {
      this.cpu = cpu;
   }

   public void setDisk(Double disk) {
      this.disk = disk;
   }

   public void setGpu(Double gpu) {
      this.gpu = gpu;
   }

   public void setMemory(Double memory) {
      this.memory = memory;
   }

   public void setNetworkDownward(Double networkDownward) {
      this.networkDownward = networkDownward;
   }

   public void setNetworkUpward(Double networkUpward) {
      this.networkUpward = networkUpward;
   }

   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof MachineStateVO)) {
         return false;
      } else {
         MachineStateVO other = (MachineStateVO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            label95: {
               Object this$name = this.getName();
               Object other$name = other.getName();
               if (this$name == null) {
                  if (other$name == null) {
                     break label95;
                  }
               } else if (this$name.equals(other$name)) {
                  break label95;
               }

               return false;
            }

            Object this$cpu = this.getCpu();
            Object other$cpu = other.getCpu();
            if (this$cpu == null) {
               if (other$cpu != null) {
                  return false;
               }
            } else if (!this$cpu.equals(other$cpu)) {
               return false;
            }

            Object this$disk = this.getDisk();
            Object other$disk = other.getDisk();
            if (this$disk == null) {
               if (other$disk != null) {
                  return false;
               }
            } else if (!this$disk.equals(other$disk)) {
               return false;
            }

            label74: {
               Object this$gpu = this.getGpu();
               Object other$gpu = other.getGpu();
               if (this$gpu == null) {
                  if (other$gpu == null) {
                     break label74;
                  }
               } else if (this$gpu.equals(other$gpu)) {
                  break label74;
               }

               return false;
            }

            label67: {
               Object this$memory = this.getMemory();
               Object other$memory = other.getMemory();
               if (this$memory == null) {
                  if (other$memory == null) {
                     break label67;
                  }
               } else if (this$memory.equals(other$memory)) {
                  break label67;
               }

               return false;
            }

            Object this$networkDownward = this.getNetworkDownward();
            Object other$networkDownward = other.getNetworkDownward();
            if (this$networkDownward == null) {
               if (other$networkDownward != null) {
                  return false;
               }
            } else if (!this$networkDownward.equals(other$networkDownward)) {
               return false;
            }

            Object this$networkUpward = this.getNetworkUpward();
            Object other$networkUpward = other.getNetworkUpward();
            if (this$networkUpward == null) {
               if (other$networkUpward != null) {
                  return false;
               }
            } else if (!this$networkUpward.equals(other$networkUpward)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof MachineStateVO;
   }

   public int hashCode() {
      
      int result = 1;
      Object $name = this.getName();
      result = result * 59 + ($name == null ? 43 : $name.hashCode());
      Object $cpu = this.getCpu();
      result = result * 59 + ($cpu == null ? 43 : $cpu.hashCode());
      Object $disk = this.getDisk();
      result = result * 59 + ($disk == null ? 43 : $disk.hashCode());
      Object $gpu = this.getGpu();
      result = result * 59 + ($gpu == null ? 43 : $gpu.hashCode());
      Object $memory = this.getMemory();
      result = result * 59 + ($memory == null ? 43 : $memory.hashCode());
      Object $networkDownward = this.getNetworkDownward();
      result = result * 59 + ($networkDownward == null ? 43 : $networkDownward.hashCode());
      Object $networkUpward = this.getNetworkUpward();
      result = result * 59 + ($networkUpward == null ? 43 : $networkUpward.hashCode());
      return result;
   }

   public String toString() {
      return "MachineStateVO(name=" + this.getName() + ", cpu=" + this.getCpu() + ", disk=" + this.getDisk() + ", gpu=" + this.getGpu() + ", memory=" + this.getMemory() + ", networkDownward=" + this.getNetworkDownward() + ", networkUpward=" + this.getNetworkUpward() + ")";
   }
}
